<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组</title>
</head>

<body>
  <div></div>
  <div></div>
  <div></div>
  <script>
    const divs = document.querySelectorAll('div');
    console.log(divs);
    const divArr = [...divs];
    console.log(divArr);
    // 变成数组后，数组的方法都可以使用
  </script>
</body>

</html>